#ifndef _RAYTRACERENDERPASS_H_
#define _RAYTRACERENDERPASS_H_
#include <SERender/Renderer/RenderPass/RenderPass.h>
#include <SECore/Manager.h>
#include <SERender/Resourses/Material.h>
#include <SERender/Resourses/FrameBuffer.h>
#include <SEngine/Util/RenderPassGUIHandler.h>

namespace SEngine
{
    class RayTraceRenderPass : public RenderPass, public RenderPassGUIHandler
    {
    public:
        RayTraceRenderPass(Renderer & renderer);
        virtual void BeginFrame() override {}
        virtual void DrawFrame() override;
        virtual void EndFrame() override {}

    private:
        void Clear();
    private:
        ResRef<Material> m_rayTraceMaterial;
        ResRef<Material> m_billboardMaterial;
        std::unique_ptr<FrameBuffer> m_fbo;
        std::shared_ptr<Texture> m_rayTraceRT[2];
        int m_frameCount{1};
        glm::mat4 m_lastView;
    };
} // namespace SEngine


#endif